import React,{useState} from "react";
import ThemeProvider from "./Context";
import Left from "../Left";
import Right from "./Right";

const App = () => {
    const [isShowRight,setShowRight] = useState(true);

    const hideRight = () => {
        setShowRight(!isShowRight)
    }
    return <div>
            <ThemeProvider>
                <button onClick={hideRight}>隐藏Right</button>
                <Left />
                {isShowRight&&<Right />}
            </ThemeProvider>
        </div>
}

export default App;